// JavaScript Document
function revision(url, html_element) {
		document.getElementById('ocultar').style.display="none";
		document.getElementById('revelacion').style.display="block";
		setCookie("adelgazamee","1",100);
		check();
	}
	function setCookie(cname,cvalue,exdays){
		var d = new Date();
		d.setTime(d.getTime()+(exdays*24*60*60*1000));
		var expires = "expires="+d.toGMTString();
		document.cookie = cname + "=" + cvalue + "; " + expires;
	}
	function getCookie(cname){
		var name = cname + "=";
		var ca = document.cookie.split(';');
		for(var i=0; i<ca.length; i++){
			var c = ca[i].trim();
			if (c.indexOf(name)==0) return c.substring(name.length,c.length);
		}
		return "";
	}
	
function check(){
var username=getCookie("adelgazamee");
if (username!=""){
document.getElementById('revelacion').style.display="block";
	}
else 
  {}
  }
if (top != self) document.body.style.background = 'transparent';
if(getCookie("adelgazamee")==1){
document.getElementById('ocultar').style.display="none";
document.getElementById('relevacion').style.display="block";
}
(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1&appId=";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	window.fbAsyncInit = function () {
	        FB.init({
        	    appId: '', 
                status: true,
                cookie: true,
                xfbml: true,
                oauth: true
        	});
		FB.Event.subscribe('edge.create', revision);
	};
	
        fbtp_share = function () {
            console.log("Button Hit");
            FB.ui({
                method: "stream.share",
 				u: 'http://www.videoynoticias.com/2014/02/video-nino-de-13-anos-es-condenado.html'
            }, function (a) {
                a && revision(!0)
            })
        };	